package capricornus.item
{
	import flash.events.Event;
	
	public class ItemEvent extends Event
	{
		public static const DRAG_ITEM_START:String = "DRAG_ITEM_START";                               //拖动开始
		public static const DRAG_ITEM_DISCARDED:String = "DRAG_ITEM_DISCARDED";                       //当前拖动被抛弃
		
		public static const DRAG_ITEM_OVER:String = "DRAG_ITEM_OVER";                                 //有item到来
		public static const DRAG_ITEM_OVER_AND_MOVING:String = "DRAG_ITEM_OVER_AND_MOVING";           //有item在移动
		public static const DRAG_ITEM_OUT:String = "DRAG_ITEM_OUT";                                   //当前item移出
		
		public static const DRAG_ITEM_DROPPED:String = "DRAG_ITEM_DROPPED";                           //当前item放下（放下位置的container接收此消息）,真正有效的事件，不管前面over等的三个事件如何处理都会有这个事件产生
		
		public static const DRAG_ITEM_TO_OTHER_CONTAINER:String = "DRAG_ITEM_TO_OTHER_CONTAINER";     //当前item被其他container接收，源container接收将接收到此消息
		
		public static const DOUBLE_CLICK:String = "DOUBLE_CLICK";                                     //container双击
		
		internal static const ITEM_SHAPE_CHANGE:String = "ITEM_SHAPE_CHANGE";
		
		public var originContainer:ItemContainer;
		
		public var isAcceptCurrentItem:Boolean = true;
		
		public function ItemEvent(type:String, originContainer:ItemContainer=null, bubbles:Boolean=false, cancelable:Boolean=false)
		{
			this.originContainer = originContainer;
			
			super(type, bubbles, cancelable);
		}
	}
}